from sqlalchemy import Column, Integer, String
from sqlalchemy.dialects.mysql import LONGTEXT
from models.base import db


class orders(db.Base):
    __tablename__ = 'orders'
    create_time = Column('create_time', Integer)
    id = Column(Integer, autoincrement=True, primary_key=True)
    order_number = Column(String(30), unique=True, nullable=False, default='')
    title = Column(String(100), nullable=False, default='')
    author = Column(String(50), nullable=True)
    content = Column(LONGTEXT, nullable=False, default='')
    char_sum = Column(Integer, default=0)
